<%@page import="cn.edu.pzhu.pojo.UserInfo"%>
<%@page import="cn.edu.pzhu.pojo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
<jsp:include page="menu.jsp"></jsp:include>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>分享文件</title>
<link rel="stylesheet" type="text/css" href="css/upload.css" />
<style type="text/css">
	body {
  		 background-image: url("img/background.png");
   		 background-size: cover;
   		 font-family: "Noto Sans SC", sans-serif;
	}
	.fd::file-selector-button {
		font-family: "Open Sans", sans-serif;
		font-size: 15px;
		font-weight:bolder;
   		cursor: pointer;
		color: white; /* 按钮文本颜色 */
   		background-color: #5cb85c; 
    	border: none; /* 按钮边框 */
   		padding: 5px 10px; /* 按钮内边距 */
  		border-radius: 8px; /* 按钮边框圆角 */
   		margin-right: 10px; /* 按钮与文本间距 */
	}
	.fd::file-selector-button:hover {
   		background-color: #4cae4c;
	}
</style>
	<script type="text/javascript">
		function ConfirmUpdate() {
			return confirm("您确定要更新文件信息吗？");
		}
	</script>
</head>
<body>
	<div style="height: 50px"></div>
	<form action="upload" method="post"  enctype="multipart/form-data" class="f4">
		<h1 class="title">更新文件</h1>
		<table class="ta">
			<tr>
				<td>文件名</td>
				<td><input type="text" name="filename" class="te" value="${list[param.id].filename}"/></td>
			</tr>
			<tr>
				<td>选择文件</td>
				<td><input type="file" name="file" class="fd"/></td>
			</tr>
			<tr>
				<td>文件类型</td>
				<td>
				<select name="classification" class="fd">
           		<option value="法律规定">法律规定</option>
            	<option value="管理办法">管理办法</option>
            	<option value="决定条例">决定条例</option>
            	<option value="细则解释">细则解释</option>
            	<option value="规范指南">规范指南</option>
        		</select>	
				</td>
			</tr>
			<tr>
				<td>公开时间</td>
				<td>
					<fmt:formatDate value="${list[param.id].releasedate}" pattern="yyyy-MM-dd" var="formattedDate"/>
					<input type="date" name="releasedate" class="fd" value="${formattedDate}"/>
				</td>
			</tr>
			<tr>
				<td>推荐指数</td>
				<td><input type="text" name="rating" class="te" value="${list[param.id].rating}"/></td>
			</tr>
			<tr>
				<td>文件描述</td>
				<td><input type="text" name="description" class="te" value="${list[param.id].description}"/></td>
			</tr>
			<tr>
				<td colspan="2">
				<input type="submit" value="更新" class="sub" onclick="return ConfirmUpdate()"/>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>